package com.mocha.Test;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateT {
	public static void main(String[] args) {
		String string = "2017-12-11T12:24:56";
		int index = string.indexOf("T");
		System.out.println(index);
		String str =  string.substring(0,index)+"-"+string.substring(index+1);
		System.out.println(str);
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-hh:mm");
		try {
			Date date = sdf.parse(str);
			System.out.println(date.toLocaleString());
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
